package collections.list;


public class ListElement<T> {
    private T value;
    private ListElement node;

    public ListElement(T t) {
        this.value = t;
    }

    public ListElement getNode() {
        return node;
    }

    public void setNode(ListElement node) {
        this.node = node;
    }

    public T getValue() {
        return value;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || value.getClass() != o.getClass()) return false;
        if (value != null) return value.equals(o);
        return true;
    }
}